<%@ page isELIgnored="false" contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="com.lagou.edu.model.entity.Resume" %>
<%@ page import="java.util.List" %>
<html>
<head>
    <title>SpringMVC 测试页</title>


    <script type="text/javascript" src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>



    <style>
        div {
            padding: 10px 10px 0 10px;
        }
    </style>
</head>
<body>

<div>
    <h2>作业验证</h2>
    <div>
        <a id="add" href="/resumes/toAdd" style="float: right;background-color: aqua">添加</a>
        <table border="1" align="center" cellpadding="0" width="450px;">
            <thead>
            <th width="80px;" bgcolor="#f0f8ff" width="">姓名</th>
            <th width="80px;" bgcolor="#f0f8ff">地址</th>
            <th width="80px;" bgcolor="#f0f8ff">手机号</th>
            <th width="130px;" bgcolor="#f0f8ff">操作</th>
            </thead>
            <tbody>
            <% List<Resume> list = (List<Resume>) request.getAttribute("data");
                for (Resume resume : list) {%>
            <tr align="center">
                <td><%= resume.getName() %>
                </td>
                <td><%= resume.getAddress() %>
                </td>
                <td><%= resume.getPhone() %>
                </td>
                <td id="<%= resume.getId() %>">
                    <a href="/resumes/toEdit?id=<%=resume.getId()%>" id="edit">编辑</a>
                    <form action="/resumes/delete" method="post">
                        <input type="hidden" name="_method" value="delete"/>
                        <input type="hidden" name="id" value="<%=resume.getId()%>"/>
                        <input type="submit"  value="删除"/>
                    </form>
                </td>
            </tr>
            <%} %>
            </tbody>
        </table>
    </div>



</body>
</html>
